<form method="POST" action="">
Chọn giảng viên
<select name="f_giangvien">
<?php
ob_start();
$f_maphieu = $_GET['id'];
	include 'connect/connect.php';
include 'class/class.phieuthu.php';	
	$phieuthu=new phieuthu;	
	check_admin();
	$result = mysql_query('SELECT * FROM tbl_giangvien') ;
	while($row = mysql_fetch_array($result))
	{
		echo '<option value='.$row['id'].'>'.$row['f_hovaten'].'</option>';
	}
?>

</select>
<input type="submit" value="Sếp lớp">
</form>
<p>
<?php

$f_giangvien = $_POST['f_giangvien'];
$tengiangvien = $phieuthu->giang_vien($f_giangvien);
if ($f_giangvien != '')
{

	$sql = "UPDATE tbl_thuphieu SET f_tengiangvien= '".$tengiangvien."' , f_giangvien ='" . $f_giangvien. "' Where f_maphieu={$f_maphieu}";
	
mysql_query ($sql);
}
?>